//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//     Filename: KenoXMLTranslator.h                                        //
//  Create date: August 03, 2007                                            //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//                                                                          //
// Description: This file describes the KenoXMLTranslator class.  This class//
//               is a protocol translator that translates from the RTG      //
//               Keno protocol to XML and back.                             //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//       Copyright (c) 2007 - Realtime Gaming.  All rights reserved.        //
//////////////////////////////////////////////////////////////////////////////

#ifndef __KENO_XML_TRANSLATOR__
#define __KENO_XML_TRANSLATOR__

#include "XMLTranslator.h"

//////////////////////////////////////////////////////////////////////////////
// KenoXMLTranslator Class
//////////////////////////////////////////////////////////////////////////////
class KenoXMLTranslator : public XMLTranslator
{
public:
    KenoXMLTranslator( Server* pServer, Connection* pParent );
    virtual ~KenoXMLTranslator();

    // Public Interface
    virtual bool8  TranslateIncomingMessage( uint8* pGameInBuff,  uint32 nGameInBuffSize, uint8* pBuff, uint32 nOutBuffSize );
    virtual uint32 TranslateOutgoingMessage( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize, uint32 nTotalGameBytes );

protected:
	// Incoming
	bool8 TranslateInLogin  ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	bool8 TranslateInBet   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );

	// Outgoing
	bool8 TranslateOutLogin   ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutBet     ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );	
	bool8 TranslateOutError   ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );

};

#endif //#ifndef __KENO_XML_TRANSLATOR__